<template>
  <div class="m-chain-info">
    <div class="item flex-left">
      <i class="iconfont iconBTY"></i>
      <div class="detail">
        <p class="title">BTY当前价格</p>
        <p class="value">$ {{btyInfo.usd}} / ￥{{btyInfo.rmb}}</p>
      </div>
    </div>
    <div class="item flex-left">
      <i class="iconfont icondangqianzongliang"></i>
      <div class="detail">
        <p class="flex-between">
          <span class="title">当前总量</span>
          <span class="title">当前总市值</span>
        </p>
        <p class="flex-between">
          <span class="value">{{parseInt(btyInfo.totalSum)|filterNum}} BTY</span>
          <span class="value">{{parseInt(btyInfo.totalSum*btyInfo.rmb)|filterNum}} CNY</span>
        </p>
      </div>
    </div>
    <div class="item flex-left">
      <i class="iconfont iconpingjunchukuai"></i>
      <div class="detail">
        <p class="flex-between">
          <span class="title">平均出块时间</span>
          <span class="title">每秒交易数</span>
        </p>
        <p class="flex-between">
          <span class="value">{{btyInfo.perTime.toFixed(2)}} s</span>
          <span class="value">{{btyInfo.perTxCount.toFixed(2)}}</span>
        </p>
      </div>
    </div>
    <div class="item flex-left">
      <i class="iconfont iconjiaoyibishu"></i>
      <div class="detail">
        <p class="title">交易笔数</p>
        <p class="value">{{parseInt(btyInfo.txCount)|filterNum}} 笔</p>
      </div>
    </div>
  </div>
</template>

<script>
import chainBase from "@/mixins/Home/chainInfo.js";
export default {
  mixins: [chainBase]
};
</script>

<style lang="scss" scoped>
.m-chain-info {
  padding-top: 10px;
  .item {
    margin-bottom: 10px;
    padding: 12px 20px;
    height: 61px;
    background: $white;
    .iconfont {
      margin-right: 20px;
      color: $blue;
      font-size: 35px;
    }
    .detail {
      width: 100%;
      p {
        font-family: PingFangSC;
        line-height: 20px;
      }
      .value {
        color: $black;
      }
      .title {
        color: $font_grey;
      }
    }
  }
}
</style>